package com.zjitc.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;

@Configuration
@ComponentScan(basePackages = "com.zjitc.controller")
@EnableWebMvc
public class SpringMVCConfig implements WebMvcConfigurer {

    public void configureViewResolvers(ViewResolverRegistry registry) {
        registry.jsp("/WEB-INF/", ".jsp");
    }

    public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
        configurer.enable();
    }
//    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("/detail").setViewName("forward:/WEB-INF/detail.jsp");
//    }
}
